<template>
  <div class="container">
    <el-table
    :data="tableData"
    :stripe="true"
    style="width: 100%">
    <el-table-column
      label="序号"
      type="index"
      width="50">
    </el-table-column>
    <el-table-column
      label="录入用户名"
      >
      <template slot-scope="scope">
        <span >{{ scope.row.name }}</span>
      </template>
    </el-table-column>
    <el-table-column
      label="录入人"
      >
      <template slot-scope="scope">
        <span >{{ scope.row.optionuser }}</span>
      </template>
    </el-table-column>
    <el-table-column
      label="创建时间"
      >
      <template slot-scope="scope">
        <span >{{ scope.row.date }}</span>
      </template>
    </el-table-column>
    <el-table-column label="操作">
      <template slot-scope="scope">
        <el-button
          size="mini"
          @click="handleEdit(scope.$index, scope.row)">查看详情</el-button>
      </template>
    </el-table-column>
  </el-table>
  </div>
</template>

<script>
export default {
  data() {
    return {
      tableData: [
        {
          date: "2021年1月11日",
          name: "王小虎",
          optionuser:"李岩",
          id: 1,
        },
        {
          date: "2021年2月11日",
          name: "张三",
          optionuser:"李岩",
          id: 2,
        },
      ],
      search: "",
    };
  },
  methods: {
    handleEdit(index, row) {
      console.log(index, row);
      this.$router.push({ name: "information-record-main/main" });
    },
  },
};
</script>

<style>
.container{
    padding:0.5rem;
}
</style>